<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>后台管理 - 易买网</title>
    <link type="text/css" rel="stylesheet" href="/css/style.css"/>
    <script type="text/javascript" src="/scripts/function-manage.js"></script>
</head>

<body>
<%@ include file="/WEB-INF/manage/common/head.jsp" %>
<%@ include file="/WEB-INF/manage/common/position.jsp"%>
<div id="main" class="wrap">
    <%@include file="/WEB-INF/manage/common/left.jsp" %>
    <div class="main">
        <h2>分类管理</h2>
        <div class="manage">
            <table class="list">
                <tr>
                    <th>ID</th>
                    <th>分类名称</th>
                    <th>操作</th>
                </tr>

                <c:forEach items="${productCategories}" var="productCategoryParent">
                    <tr>
                        <td class="first w4 c">${productCategoryParent.id}</td>
                        <td>${productCategoryParent.name}</td>
                        <td class="w1 c"><a href="/product/category/input?id=${productCategoryParent.id}">修改</a> <a
                                href="javascript:Delete('/product/category/delete?id=${productCategoryParent.id}');">删除</a>
                        </td>
                    </tr>
                    <c:forEach items="${productCategoryParent.productCategoryChildren}" var="productCategoryChildren">
                        <tr>
                            <td class="first w4 c">${productCategoryChildren.id}</td>
                            <td class="childClass">${productCategoryChildren.name}</td>
                            <td class="w1 c"><a href="/product/category/input?id=${productCategoryChildren.id}">修改</a>
                                <a href="javascript:Delete('/product/category/delete?id=${productCategoryChildren.id}');">删除</a>
                            </td>
                        </tr>
                    </c:forEach>
                </c:forEach>
            </table>
        </div>
    </div>
    <div class="clear"></div>
</div>
<%@ include file="/WEB-INF/common/footer.jsp"%>
</body>
</html>
